import request from '@/utils/request';
import store from "@/store";

const env = import.meta.env.MODE || 'development';
const prefix = '';

// 列表 /apiapp/v1/warehouse/list
export function warehouseListApi (params) {
  return request({
    url: `${prefix}/apiapp/v1/warehouse/list`,
    method: 'get',
    params
  });
}

// 详情 /apiapp/v1/warehouse/details
export function warehouseDetailApi (id, params) {
  return request({
    url: `${prefix}/apiapp/v1/warehouse/details?id=${id}`,
    method: 'get',
    params
  });
}

// 新增 /apiapp/v1/warehouse/create
export function warehouseCreateApi (data) {
  return request({
    url: `${prefix}/apiapp/v1/warehouse/create`,
    method: 'post',
    data
  });
}

// 编辑 /apiapp/v1/warehouse/edit
export function warehouseEditApi (data) {
  return request({
    url: `${prefix}/apiapp/v1/warehouse/edit`,
    method: 'post',
    data
  });
}

// 删除 /apiapp/v1/warehouse/delete
export function warehouseDeleteApi (data) {
  return request({
    url: `${prefix}/apiapp/v1/warehouse/delete`,
    method: 'post',
    data
  });
}
